<%@ page language="java" contentType="text/html; charset=utf-8"
    pageEncoding="utf-8" import="com.DbSQL,java.sql.ResultSet,java.sql.Statement"%>
<!DOCTYPE html PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN" "http://www.w3.org/TR/html4/loose.dtd">
<% 
Statement sta = DbSQL.getstm();
ResultSet rs = sta.executeQuery("SELECT COUNT(post_num),post_num,post.content,post.theme,post.time,nickname,topic.type,topic.content "+
		"FROM post,indirect_post,user1,topic "+
		"WHERE indirect_post.reply_num = post.post_num AND user1.account=post.account AND topic.topic_num=post.topic_num "+
		"GROUP BY post_num "+ 
		"ORDER BY COUNT(post_num) DESC");
if(rs==null)
{
   out.println("数据库中没有数据");
   return ;
}
%>
<link rel="stylesheet" type="text/css" href="css1.css" />
<html>
<head>
<meta http-equiv="Content-Type" content="text/html; charset=utf-8">
<title>Insert title here</title>
</head>
<body>
<center>
   <h1>热门帖子</h1>
   <div class='tie'>
   <center>
       <%while(rs.next()){%>
       <div class='tie1' align="left">
	      <br/>
	      &nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;<%=rs.getString(6)%><br />
		  <font face="宋体" size="3" color="#3366FF"><B>
		  &nbsp;&nbsp;&nbsp;     [<%=rs.getString(8)%>]   
		  <a href="/xiaonei1227/tiezi.jsp?post_Num=<%=rs.getString(2)%>">
		  <%=rs.getString(4)%></a></B></font><br />
          &nbsp;&nbsp;&nbsp;<%=rs.getString(3)%><br />  
          &nbsp;&nbsp;&nbsp;&nbsp;&nbsp; &nbsp;&nbsp;&nbsp; &nbsp;&nbsp;&nbsp;
          <%=rs.getString(5)%>
	      <span style="position:absolute;right:210px;">回复数
	      <font color="#ff0000"><%=rs.getString(1)%></font></span>
	   </div>
	   <%}%>
   </center>
</div>
   
</center>
</body>
</html>